package com.guashu.designpatterns.chainresponsibility;

// Test.java
public class Test {

    public static void main(String[] args) {
        Handler.Builder<Member> builder = new Handler.Builder<>();
        builder.addHandler(new ValidateHandler())
                .addHandler(new LoginHandler())
                .addHandler(new AuthHandler())
                .addHandler(new BusinessLogicHandler());
        Member member = new Member();
        member.setUserName("jack");
        member.setPassWord("666");
        member.setRoleName("管理员");
        builder.build().doHandler(member);
    }
}

